<?php

//require_once('config.inc');
session_start();
$username = addslashes($_POST['username']);
if ($username!="foo") {		
	$_SESSION['valid_user']='asdasdas';
	//unset($_SESSION['valid_user'],$valid_user);
	session_destroy();
	header( "Location: index.php" );
}
echo "successful login";

$_SESSION['valid_user']=$username;
// logged in, return home
header("Location: index.php");
